/**
 * ColumnsService.java
 *
 * Copyright (c) 2009 prjmanager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of prjmanager .
 **/
package ro.prjmanager.service;


import ro.prjmanager.core.service.AbstractService;
import ro.prjmanager.core.service.Service;
import ro.prjmanager.dao.ColumnsDao;
import ro.prjmanager.model.Columns;

import java.util.List;

/**
 * This class is business logic for columns table
 * It manages all transaction maded to columns table
 * @author Viorel Tacliciu
 * @version 0.0.1
 **/


public class ColumnsService extends AbstractService<Columns,Integer> implements Service<Columns,Integer> {



    public void create(Columns user){
        dao.create(user);
    }


    public void delete(Integer id){
        Columns user =new Columns();
        user.setId(id);
        dao.delete(user);
    }

    public Columns load(Integer id){
         return dao.find(id,false);
    }

    public List<Columns> listPag(int startPage, int resPerPage) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public List<Columns> listPag(int startPage, int resPerPage, String orderCol, boolean asc, Object... otherItems) {
        return dao.listPag(startPage, resPerPage,orderCol, asc, otherItems);
    }

    public List<Columns> list() {
        return dao.findAll();
    }

    public List<Columns> listPagFilter(int startPage, int resPerPage, String filter) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public int no(String filter) {
        return dao.no(filter);
    }

    public void update(Columns entity) {
        dao.update(entity);
    }


}
